﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SqlCe4Mvc3Application1.Models
{
    public partial class _Orchard_Comments_CommentPartRecord : RaisingStudio.Data.Expressions.TableExpression, RaisingStudio.Data.Expressions.IQueryExpression<_Orchard_Comments_CommentPartRecord>
    {
        #region Constructor (s) / Destructor
        /// <summary>
        /// Constructor (s) / Destructor.
        /// </summary>
        public _Orchard_Comments_CommentPartRecord() : base("Orchard_Comments_CommentPartRecord")
        {
        }
        #endregion
        #region Members
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Id = "Id";
        public RaisingStudio.Data.Expressions.ColumnExpression Id { get { return _Id; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Author = "Author";
        public RaisingStudio.Data.Expressions.ColumnExpression Author { get { return _Author; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _SiteName = "SiteName";
        public RaisingStudio.Data.Expressions.ColumnExpression SiteName { get { return _SiteName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _UserName = "UserName";
        public RaisingStudio.Data.Expressions.ColumnExpression UserName { get { return _UserName; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Email = "Email";
        public RaisingStudio.Data.Expressions.ColumnExpression Email { get { return _Email; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _Status = "Status";
        public RaisingStudio.Data.Expressions.ColumnExpression Status { get { return _Status; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CommentDateUtc = "CommentDateUtc";
        public RaisingStudio.Data.Expressions.ColumnExpression CommentDateUtc { get { return _CommentDateUtc; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CommentText = "CommentText";
        public RaisingStudio.Data.Expressions.ColumnExpression CommentText { get { return _CommentText; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CommentedOn = "CommentedOn";
        public RaisingStudio.Data.Expressions.ColumnExpression CommentedOn { get { return _CommentedOn; } }
        public static readonly RaisingStudio.Data.Expressions.ColumnExpression _CommentedOnContainer = "CommentedOnContainer";
        public RaisingStudio.Data.Expressions.ColumnExpression CommentedOnContainer { get { return _CommentedOnContainer; } }

		#endregion

        public static implicit operator RaisingStudio.Data.Expressions.ConditionExpression(_Orchard_Comments_CommentPartRecord Orchard_Comments_CommentPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ConditionExpression();
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression)
        {
             RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
             return conditionExpression.OrderBy(columnExpression);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression OrderBy(RaisingStudio.Data.Expressions.ColumnExpression columnExpression, RaisingStudio.Data.Expressions.SortingDirection sortingDirection)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.OrderBy(columnExpression, sortingDirection);
        }

        public RaisingStudio.Data.Expressions.ConditionExpression Where(RaisingStudio.Data.Expressions.ExpressionElement expressionElement)
        {
            RaisingStudio.Data.Expressions.ConditionExpression conditionExpression = this;
            return conditionExpression.Where(expressionElement);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpressionCollection(_Orchard_Comments_CommentPartRecord Orchard_Comments_CommentPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpressionCollection(Orchard_Comments_CommentPartRecord);
        }

        public static implicit operator RaisingStudio.Data.Expressions.ColumnExpression[](_Orchard_Comments_CommentPartRecord Orchard_Comments_CommentPartRecord)
        {
            return new RaisingStudio.Data.Expressions.ColumnExpression[]
                        {                            
                            Orchard_Comments_CommentPartRecord.Id,
                            Orchard_Comments_CommentPartRecord.Author,
                            Orchard_Comments_CommentPartRecord.SiteName,
                            Orchard_Comments_CommentPartRecord.UserName,
                            Orchard_Comments_CommentPartRecord.Email,
                            Orchard_Comments_CommentPartRecord.Status,
                            Orchard_Comments_CommentPartRecord.CommentDateUtc,
                            Orchard_Comments_CommentPartRecord.CommentText,
                            Orchard_Comments_CommentPartRecord.CommentedOn,
                            Orchard_Comments_CommentPartRecord.CommentedOnContainer,
                        };
        }

        public RaisingStudio.Data.Expressions.ColumnExpressionCollection Except(params RaisingStudio.Data.Expressions.ColumnExpression[] columns)
        {
            RaisingStudio.Data.Expressions.ColumnExpressionCollection columnExpressionCollection = this;
            return columnExpressionCollection.Except(columns);
        }

    
        public static implicit operator RaisingStudio.Data.Expressions.QueryExpression<_Orchard_Comments_CommentPartRecord>(_Orchard_Comments_CommentPartRecord Orchard_Comments_CommentPartRecord)
        {
            return new RaisingStudio.Data.Expressions.QueryExpression<_Orchard_Comments_CommentPartRecord>(Orchard_Comments_CommentPartRecord);
        }


        #region IQueryExpression<_Orchard_Comments_CommentPartRecord> 成员

        _Orchard_Comments_CommentPartRecord RaisingStudio.Data.Expressions.IQueryExpression<_Orchard_Comments_CommentPartRecord>.Value
        {
            get { return Orchard_Comments_CommentPartRecord._; }
        }

        #endregion

        #region IQueryExpression 成员

        RaisingStudio.Data.Expressions.TableExpression RaisingStudio.Data.Expressions.IQueryExpression.Table
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ConditionExpression RaisingStudio.Data.Expressions.IQueryExpression.Condition
        {
            get { return this; }
        }

        RaisingStudio.Data.Expressions.ColumnExpressionCollection RaisingStudio.Data.Expressions.IQueryExpression.Columns
        {
            get { return null; }
        }

        #endregion
    }

    partial class Orchard_Comments_CommentPartRecord
    {
        #region Members
        public static readonly _Orchard_Comments_CommentPartRecord _ = new _Orchard_Comments_CommentPartRecord();
		#endregion
    }
}
